<?php
     date_default_timezone_set('Asia/Shanghai');
     session_start();
	 @$startrole = $_SESSION['admin']['role'];
	 @$name= $_SESSION['admin']['user'];
	 // 定义一个函数getIP() 获取IP
function getIP() 
{ 
global $ip; 

if (getenv("HTTP_CLIENT_IP")) 
$ip = getenv("HTTP_CLIENT_IP"); 
else if(getenv("HTTP_X_FORWARDED_FOR")) 
$ip = getenv("HTTP_X_FORWARDED_FOR"); 
else if(getenv("REMOTE_ADDR")) 
$ip = getenv("REMOTE_ADDR"); 
else 
$ip = "Unknow"; 

return $ip; 
} 
      
//   var_dump($startrole);
//   var_dump($name);
//统计访问次数
$counter = intval(file_get_contents("counter.dat"));  
//if(!$_SESSION['jingyun'])  
//{  
// $_SESSION['jingyun'] = true;  
// $counter++;  
// $fp = fopen("counter.dat","w");  
// fwrite($fp, $counter);  
// fclose($fp);  
//}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>主要内容区main</title>
<link href="css/css.css" type="text/css" rel="stylesheet" />
<link href="css/main.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="images/main/favicon.ico" />
<style>
body{overflow-x:hidden; background:#DDEEF2; padding:15px 0px 10px 5px;}
#main{ font-size:12px;}
#main span.time{ font-size:18px; color:#528dc5; width:100%; padding-bottom:10px; float:left}
#main div.top{ width:100%; background:url(images/main/main_r2_c2.jpg) no-repeat 0 10px; padding:0 0 0 15px; line-height:35px; float:left}
#main div.sec{ width:100%; background:url(images/main/main_r2_c2.jpg) no-repeat 0 15px; padding:0 0 0 15px; line-height:35px; float:left}
.left{ float:left}
#main div a{ float:left}
#main span.num{  font-size:30px; color:#538ec6; font-family:"Georgia","Tahoma","Arial";}
.left{ float:left}
div.main-tit{ font-size:14px; font-weight:bold; color:#4e4e4e; background:url(images/main/main_r4_c2.jpg) no-repeat 0 33px; width:100%; padding:30px 0 0 20px; float:left}
div.main-con{ width:100%; float:left; padding:10px 0 0 20px; line-height:36px;}
div.main-corpy{ font-size:14px; font-weight:bold; color:#4e4e4e; background:url(images/main/main_r6_c2.jpg) no-repeat 0 33px; width:100%; padding:30px 0 0 20px; float:left}
div.main-order{ line-height:30px; padding:10px 0 0 0;}
</style>
</head>
<body>
<!--main_top--> 
<table width="99%" border="0" cellspacing="0" cellpadding="0" id="main">

  <tr>
    <td colspan="2" align="left" valign="top">
    <span class="time"><strong>&nbsp;你好！<?php echo $name ?></strong></span>
    <span class="time">&nbsp;您是:<?php echo $startrole==0?'超级管理员':'普通管理员';?></span>
    <div class="top"><span class="left">当前时间:<?php  echo date('Y-m-d H:i:s',time());?>   登录IP：<?php echo getIP();?> </a></div>
    <div class="sec">这是您第<span class="num">59</span>次,登录！</div>
    <div class="sec">被不同用户访问<span class="num"><?php echo "$counter";?></span>次</div>

    </td>
	
  </tr>

  <tr>
    <td align="left" valign="top" width="50%">
    <div class="main-tit">网站信息</div>
    <div class="main-con">
    会员注册：开启<br/>
会员投稿：开启<br/>
管理员个数：<font color="#538ec6"><strong>6</strong></font> 人<br/>
登陆者IP：192.168.1.156<br/>
程序编码：UTF-8<br/>
    </div>
    </td>
    <td align="left" valign="top" width="49%">
    <div class="main-tit">服务器信息</div>
    <div class="main-con">
服务器软件：Apache/2.2.6 (Win32) PHP/5.2.5<br/>
PHP版本：5.2.5<br/>
MYSQL版本：5.0.45-community-nt<br/>
魔术引用：开启 (建议开启)<br/>
使用域名：192.168.1.124 <br/>
    </div>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">
    <div class="main-corpy">系统提示</div>
    <div class="main-order">1=>如您在使用过程有发现出错请及时与我们取得联系；为保证您得到我们的后续服务，强烈建议您购买我们的正版系统或向我们定制系统！<br/>
2=>强烈建议您将IE7以上版本或其他的浏览器</div>
    </td>
  </tr>
</table>
<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.thinkpage.cn/widget/chameleon.js"))</script>
<script>tpwidget("init", {
    "flavor": "bubble",
    "location": "WTW3SJ5ZBJUY",
    "geolocation": "enabled",
    "position": "top-right",
    "margin": "10px 10px",
    "language": "zh-chs",
    "unit": "c",
    "theme": "chameleon",
    "uid": "U9D7975005",
    "hash": "cf7e18d5eda6d121ea7cff0e54bd74d0"
});
tpwidget("show");</script
</body>
</html>